<div class="inmodal">
    <div class="modal-header">
        <h4 class="modal-title">{{operation | translate}}(ID:{{category.id}})</h4>
    </div>
    <div class="modal-body">
        <form role="form" name="form_category" novalidate class="form-horizontal">
            <div class="form-group"><label class="col-sm-3 control-label">{{'SETTING.NAME' | translate}}</label>

                <div class="col-sm-9"><input ng-model="category.name" type="text" name="categoryname" class="form-control" required="">
                    <div class="m-t-xs" ng-show="form_category.categoryname.$invalid && form_category.categoryname.$dirty">
                        <small class="text-danger" ng-show="form_category.categoryname.$error.required">{{'SETTING.INPUT_NAME' | translate}}</small>
                    </div>
                </div>
            </div>
            <div class="hr-line-dashed"></div>
            <div class="form-group"><label class="col-sm-3 control-label">{{'SETTING.UNIT' | translate}}</label>

                <div class="col-sm-9"><input ng-model="category.unit_of_measure" type="text" name="categoryunit" class="form-control" required="">
                <div class="m-t-xs" ng-show="form_category.categoryunit.$invalid && form_category.categoryunit.$dirty">
                        <small class="text-danger" ng-show="form_category.categoryunit.$error.required">{{'SETTING.INPUT_UNIT' | translate}}</small>
                    </div>
                </div>
            </div>
            <div class="form-group"><label class="col-sm-3 control-label">{{'SETTING.KGCE' | translate}}</label>
                <div class="col-sm-9"><input ng-model="category.kgce" type="number" name="categorykgce" class="form-control" required="">
                    <div class="m-t-xs" ng-show="form_category.categorykgce.$invalid && form_category.categorykgce.$dirty">
                        <small class="text-danger" ng-show="form_category.categorykgce.$error.required">{{'SETTING.INPUT_KGCE' | translate}}</small>
                        <small class="text-danger" ng-show="form_category.categorykgce.$error">{{'SETTING.INVALID_FORMAT' | translate}}</small>
                    </div>
                </div>
            </div>
            <div class="form-group"><label class="col-sm-3 control-label">{{'SETTING.KGCO2E' | translate}}</label>
                <div class="col-sm-9"><input ng-model="category.kgco2e" type="number" name="categorykgco2e" class="form-control" required="">
                    <div class="m-t-xs" ng-show="form_category.categorykgco2e.$invalid && form_category.categorykgco2e.$dirty">
                        <small class="text-danger" ng-show="form_category.categorykgco2e.$error.required">{{'SETTING.INPUT_KGCO2E' | translate}}</small>
                        <small class="text-danger" ng-show="form_category.categorykgco2e.$error">{{'SETTING.INVALID_FORMAT' | translate}}</small>
                    </div>
                </div>
            </div>
        </form>
    </div>
    <div class="modal-footer">
        <button type="button" class="btn btn-white" ng-click="cancel()">{{'SETTING.CANCEL' | translate}}</button>
        <button type="button" ng-disabled="form_category.$invalid" class="btn btn-primary" ng-click="ok()">{{'SETTING.SAVE' | translate}}</button>
    </div>
</div>
